package com.lill.system.api;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.lill.common.component.util.R;
import com.lill.system.model.SysDictEntity;
import com.lill.system.service.ISysDictService;

/**
 * @program: baseframe
 * @description: 数据字段接口
 * @author: miyaxin
 * @create: 2019-04-17 09:54
 **/
@Api(value="/api/dict", tags="测试接口模块")
@RestController
@RequestMapping("api/dict")
public class SysDictsApi {

    @Autowired
    private ISysDictService sysDictService;

    /**
     * 根据code查询集合
     * @return
     */
    @ApiOperation(value="根据code查询字典集合",notes="根据code查询字典集合")
    @RequestMapping(value="/getSysDictByCode",method=RequestMethod.POST)
    public R getSysDictByCode(@RequestBody Map<String,Object> map){
        List<SysDictEntity> list = sysDictService.queryList(map);
        return R.ok().put("data",list);
    }
}
